package com.zzyl.mapper;

import com.github.pagehelper.ISelect;
import com.github.pagehelper.Page;
import com.zzyl.dto.NursingLevelPageQueryDto;
import com.zzyl.entity.NursingLevel;
import com.zzyl.vo.NursingLevelVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingLevelMapper {
    /**
     * 分页查询护理等级信息
     * @param nursingLevelPageQueryDto
     * @return
     */
    Page<NursingLevelVo> pageQuery(NursingLevelPageQueryDto nursingLevelPageQueryDto);

    /**
     * 插入护理等级信息
     * @param nursingLevel
     */
    void insert(NursingLevel nursingLevel);
    /**
     * 根据id查询护理项目
     * @return
     */
    @Select("select * from nursing_level where id = #{id}")
    NursingLevelVo selectById(Long id);

    /**
     * 根据id删除护理项目
     * @param id
     */
    @Delete("delete from nursing_level where id = #{id}")
    void delete(Long id);

    /**
     * 更新护理等级信息
     * @param nursingLevel
     */
    void updateNursingLevel(NursingLevel nursingLevel);

    /**
     * 启用禁用
     * @param id
     * @param status
     */
    void updateStatus(Long id, Integer status);

    /**
     * 获取所有护理项目
     * @return
     */
    @Select("select * from nursing_level where status = 1")
    List<NursingLevelVo> getAllList();
}
